package com.bit.spring_mybatisdemo1.controller;

import com.bit.spring_mybatisdemo1.model.UserInfo;
import com.bit.spring_mybatisdemo1.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/user")
public class UserInfoController {
    @Autowired
    public UserInfoService service;

    @RequestMapping("/alluser")
    public List<UserInfo> selectAllUser(){
        return service.selectAllUser();
    }

}
